<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>内边距</title>
    <style>
        .test {
            width: 200px;
            height: 200px;
            background-color: skyblue;
            padding-left: 20px;
            padding-top: 30px;
            /* padding 是设置文字与与盒子之间的距离 */
        }
        .one {
            width: 200px;
            height: 200px;
            background-color: red;
            padding: 5px;
        }
        .two {
            width: 200px;
            height: 200px;
            background-color: skyblue;
            padding: 5px 10px;
        }
        .three {
            width: 200px;
            height: 200px;
            background-color: red;
            padding: 5px 10px 20px;
        }
        .four {
            width: 200px;
            height: 200px;
            background-color: skyblue;
            padding: 5px 10px 20px 30px;
        }
    </style>
</head>
<body>
    <div class="test">盒子内容是content，padding会影响盒子实际大小，可以通过让width/height减去多出来的内边距大小即可保证盒子与效果图大小保持一致</div>
    <div class="one">1个值，代表上下左右都有5像素内边距</div>
    <div class="two">2个值，代表上下边距5像素，左右内边距是10像素</div>
    <div class="three">3个值，代表上内边距5像素，左右内边距10像素，下内边距20像素</div>
    <div class="four">4个值，上是5像素，右是10像素，下是20像素，左是30像素，顺时针</div>

</body>
</html>